import { lazy } from 'ice';
import BlankLayout from '@/layouts/BlankLayout';
import BasicLayout from '@/layouts/BasicLayout';

const routerConfig = [
  {
    path: '/',
    component: BlankLayout,
    children: [
      {
        path: '/login',
        exact: true,
        component: lazy(() => import(/* webpackChunkName: 'login' */ '@/pages/Login')),
      },
      {
        path: '/',
        component: BasicLayout,
        children: [
          {
            path: '/',
            exact: true,
            component: lazy(() => import(/* webpackChunkName: 'home' */ '@/pages/Dashboard')),
          },
          {
            path: '/sys/user',
            exact: true,
            component: lazy(() => import(/* webpackChunkName: 'user' */ '@/pages/User')),
          },
          {
            path: '/sys/role',
            exact: true,
            component: lazy(() => import(/* webpackChunkName: 'role' */ '@/pages/Role')),
          },
          {
            path: '/sys/menu',
            exact: true,
            component: lazy(() => import(/* webpackChunkName: 'menu' */ '@/pages/Menu')),
          },
          {
            path: '/sys/target/:url',
            exact: true,
            component: lazy(() => import(/* webpackChunkName: 'target' */ '@/pages/Target')),
          },
          {
            path: '/job/schedule',
            exact: true,
            component: lazy(() => import(/* webpackChunkName: 'schedule' */ '@/pages/Schedule')),
          },
          {
            path: '/sys/config',
            exact: true,
            component: lazy(() => import(/* webpackChunkName: 'config' */ '@/pages/Config')),
          },
          {
            path: '/sys/log',
            exact: true,
            component: lazy(() => import(/* webpackChunkName: 'log' */ '@/pages/Log')),
          },
          {
            path: '/oss/oss',
            exact: true,
            component: lazy(() => import(/* webpackChunkName: 'oss' */ '@/pages/Oss')),
          },
          {
            component: lazy(() => import(/* webpackChunkName: '404' */ '@/pages/404')),
          },
        ],
      },
    ],
  },
];

export default routerConfig;
